<?php
namespace Home\Widget;
use Think\Controller;
class MenuWidget extends Controller {
    public function nav() {
        $ArticleType = M('article_type');
        $types = $ArticleType -> where('status = 1') -> order('sort') -> select();
        $this -> assign("channels", $types);
        $this -> display('Widget:nav');
    }
}
?>